package com.model.demo.designmodel.decorate.battercake;

/**
 * 装饰器是一个抽象的类，继承了一个抽象的产品，实现了包装器的基本逻辑:把被包装者当成参数，放入构造器
 */
public class BatterCakeDecorate extends BatterCake {
    private BatterCake batterCake;

    public BatterCakeDecorate(BatterCake batterCake) {
        this.batterCake = batterCake;
    }

    @Override
    String getMsg() {
        return this.batterCake.getMsg();
    }

    @Override
    int getPrice() {
        return this.batterCake.getPrice();
    }
}
